package HibernateOrderManagerment.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Table(name="send")
@Entity
public class Send {
	@Id
	@Column(name="id")
	private long id;
//	@Column(name="send_status_id")
//	private long sendStatusId;
//	@Column(name="orders_id")
//	private long ordersId;
	@ManyToOne
	@JoinColumn(name="send_status_id")
	private SendStatus sendStatus;
	@ManyToOne
	@JoinColumn(name="orders_id")
	private Orders orders;
	
	public Send(){
		id=-1;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}
	
	

	public SendStatus getSendStatus() {
		return sendStatus;
	}

	public void setSendStatus(SendStatus sendStatus) {
		this.sendStatus = sendStatus;
	}

	public Orders getOrders() {
		return orders;
	}

	public void setOrders(Orders orders) {
		this.orders = orders;
	}

	@Override
	public String toString() {
		return "Send [id=" + id + ", sendStatusId=" + sendStatus.getId() + ", ordersId=" + orders.getId() + "]";
	}




	
	

}
